<?php
if( !defined( 'PRODUCTBUILDER' ) ): define( 'PRODUCTBUILDER', 1 );
if( !defined( 'FILE_ROOT' ) ) include_once( '../path.conf' );

class ProductBuilder
	{
	public static function get( $type )
		{
		if(file_exists(APP_ROOT.'actionaftersell_'.$type.'.class.php5'))
			{
			include_once(APP_ROOT.'actionaftersell_'.$type.'.class.php5');
			$class = "ActionAfterSell{$type}";
			return new $class('_PB_');
			}
		else
			{
			include_once(APP_ROOT.'products.class.php5');
			return new Products('_PB_');
			}
		}
	}
endif;
?>